Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the -Wunused-parameter build-time warning. #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ikmsk10
Copy link

@ikmsk10 ikmsk10 commented Jun 26, 2021

The methods of the AstVisitor base class defines interface only and
have no implementation. These should be marked as [[maybe_unused]] to
prevent propagate the build warnings.

Signed-off-by: Igor Kononenko [email protected]

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 26, 2021

CLA Signed

The committers are authorized under a signed CLA.

The methods of the `AstVisitor` base class defines interface only and
have no implementation. These should be marked as `[[maybe_unused]]` to
prevent propagate the build warnings.

Signed-off-by: Igor Kononenko <[email protected]>
@mmatsa
Copy link
Contributor

mmatsa commented Oct 14, 2021

[[maybe_unused]] was "only" added in C++17.
https://en.cppreference.com/w/cpp/language/attributes/maybe_unused

While many of us are past that at this point, not all users are.
Many of us don't see the warnings, possibly because of this line of code:
https://github.com/graphql/libgraphqlparser/blob/master/CMakeLists.txt#L8

Is it possible that the warning only comes when not compiling with the repo's cmake files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants